import React    from 'react';
import ReactDOM from 'react-dom';
import MonthPicker from  './monthpicker.js';

class CommentBox extends React.Component{
  constructor(props) {
    super(props);
    this.state = {
        mvalue: []
    };
  }

  change(value) {
       this.setState({
          mvalue:value
       })            
    }
    render() {
    return (
      <div className="commentBox">
        Hello! 月控件
        <MonthPicker change={this.change.bind(this)}/>
        <div>{this.state.mvalue.year}.{this.state.mvalue.month}</div>
      </div>
    );
    }
};



ReactDOM.render(
    <CommentBox />,
    document.getElementById('app')
);